<template>
  <view class="login_dom" v-if="isLoading">
    <view>
      <u-loading-icon size="60" color="#c52933"/>
      <view class="login_tips"> 加载中... </view>
    </view>
  </view>
</template>

<script>
  const app = getApp();

  export default {
    data() {
      return {
        isLoading: true
      }
    },
    mounted() {
      const vm = this;
      app.onLogin().then(res=>{
        this.isLoading = false;
        vm.$emit('onLogin', res);
      });
    },
  }
</script>

<style lang="scss" scoped>
  .login_dom {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100vh;
    text-align: center;
    background-color: #fff;

    .login_tips {
      // font-size: ;
      font-size: 30upx;
      line-height: 2.5;
      color: #c52933;
    }
  }
</style>
